A Most Specific Method Finding Algorithm for Reflection Based Dynamic Prolog-to-Java Interfaces
نویسندگان
چکیده
In the context of direct and reflection based extension mechanisms for the Jinni 2000 Java based Prolog system, we discuss the design and the implementation of a reflection based Prolog to Java interface. While the presence of dynamic type information on both the Prolog and the Java sides allows us to automate data conversion between method parameters, the presence of subtyping and method overloading makes finding the most specific method corresponding to a Prolog call pattern fairly difficult. We describe a run-time algorithm which closely mimics Java’s own compile-time method dispatching mechanism and provides accurate handling of overloaded methods beyond the reflection package’s limitations. As an application of our interfacing technique, a complete GUI library is built in Prolog using only 10 lines of application specific Java code.
منابع مشابه
ABCD matrix for reflection and refraction of laser beam at tilted concave and convex elliptic paraboloid interfaces and studying laser beam reflection from a tilted concave parabola of revolution
Studying Gaussian beam is a method to investigate laser beam propagation and ABCD matrix is a fast and simple method to simulate Gaussian beam propagation in different mediums. Of the ABCD matrices studied so far, reflection and refraction matrices at various surfaces have attracted a lot of researches. However in previous work the incident beam and the principle axis of surface are in parallel...
متن کاملA Navigation System for Autonomous Robot Operating in Unknown and Dynamic Environment: Escaping Algorithm
In this study, the problem of navigation in dynamic and unknown environment is investigated and a navigation method based on force field approach is suggested. It is assumed that the robot performs navigation in...
متن کاملJitting Prolog for Fun and Profit
Most Prolog implementations are implemented in low-level languages such as C and are based on a variation of the WAM instruction set, which enhances their performance but makes them hard to write. In addition, many of the more dynamic features of Prolog (like assert), despite their popularity, are not well supported. We present a high-level continuation-based Prolog interpreter based on the PyP...
متن کاملIntroducing a new meta-heuristic algorithm based on See-See Partridge Chicks Optimization to solve dynamic optimization problems
The SSPCO (See-See Particle Chicks Optimization) is a type of swarm intelligence algorithm derived from the behavior of See-See Partridge. Although efficiency of this algorithm has been proven for solving static optimization problems, it has not yet been tested to solve dynamic optimization problems. Due to the nature of NP-Hard dynamic problems, this algorithm alone is not able to solve such o...
متن کاملDynamic Modeling and Controller Design of Distribution Static Compensator in a Microgrid Based on Combination of Fuzzy Set and Galaxy-based Search Algorithm
This paper presents a nonlinear controller for a Distribution Static Compensator (DSTATCOM) of a microgrid incorporating the Distributed Generation (DG) units. The nonlinear control has been designed based on partial feedback linearization theory and Proportional-Integral-Derivative (PID) controllers try to adjust the voltage and trace the output. This paper has proposed a combination of a fuz...
متن کامل